Table onk 2nd. Rails6
5/18
参加者
onk
yebis0942
komura
Release notesを見ていく: https://edgeguides.rubyonrails.org/6_0_release_notes.html
zeitwerk
スライド: https://speakerdeck.com/fxn/zeitwerk-a-new-code-loader
https://github.com/fxn/zeitwerk/blob/2ad5b58580d91d84094d8bcf7fcfd0f043f13b5f/lib/zeitwerk/explicit_namespace.rb#L59
TracePointを使ってクラス定義をフックしている
ちょっと深入りしすぎたyebis0942.icon
複数DB対応
https://rubyinrails.com/2019/03/25/rails-6-activerecord-multi-db-connection-switching/
modelの中の設定でread, writeでDBを切り替えることができる
ブロックを使って明示的に指定することもできる
この影響でActiveRecordのgemがいろいろ壊れている?
Parallel Testing
https://edgeguides.rubyonrails.org/testing.html#parallel-testing
並列数を設定できる
threadで並列化するかprocessで並列化するか設定できる
並列実行するときの前処理、後処理も設定できる
redisとかmemcachedとかを使っているときに便利